package com.zyq.knife4j.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
//@Accessors(chain = true,fluent = true)
//启动lombok的链式编程,fluent = true表示让get和set方法没有set和get单词
public class User {


    @ApiModelProperty(value = "用户编号", required = false, example = "1001")
    private Integer id;
    @ApiModelProperty(value = "用户名", required = true, example = "赵云")
    private String name;
    @ApiModelProperty(value = "年龄", required = true, example = "50")
    private Integer age;

    public User(String name, Integer age) {
        this.name = name;
        this.age = age;
    }
}

//VO（View/Value Object）—— 视图对象
//DTO（Data Transfer Object）—— 数据传输对象
//BO（Business Object）—— 业务对象
//PO（Persistent Object）—— 持久对象
//DO（Data/Domain Object）—— 数据/领域对象
//POJO（Plain Old/Ordinary Java Object）—— 以上模型的统称